package standalone;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
import org.springframework.http.MediaType;


;

/**
 * UUID静态资源处理
 * author:xiaobo
 * date: 2016/10/12.
 */
public class UUIDResourcesHandler extends AbsResourceHandler {
    private static final Logger logger = LoggerFactory.getLogger(UUIDResourcesHandler.class);

    @Override
    protected MediaType getMediaType(Resource resource) {
        UUIDFileResource uuidFileResource =null;
        if(resource instanceof UUIDFileResource){
            uuidFileResource = (UUIDFileResource)resource;
            return  MediaType.parseMediaType(uuidFileResource.getMimeType());
        }
        return null;
    }

}
